



<template>
  <div>
    <el-row :gutter=10>
      <el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-width="100px">
        <!--        <el-row type="flex" justify="start" align="top" gutter="15">-->
        <div class="col-bor">
          <div class="col-bor-tem">
            <el-col :span="12">
              <el-form-item label="所在物业" prop="field101">
                <el-select v-model="formData.field101" placeholder="请选择所在物业" :disabled='true' clearable
                           :style="{width: '100%'}">
                  <el-option v-for="(item, index) in field101Options" :key="youmian" :label="item.label"
                             :value="item.value" :disabled="item.disabled"></el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="所在车场" prop="field102">
                <el-select v-model="formData.field102" placeholder="请选择所在车场" :disabled='true' clearable
                           :style="{width: '100%'}">
                  <el-option v-for="(item, index) in field102Options" :key="youmian" :label="item.label"
                             :value="item.value" :disabled="item.disabled"></el-option>
                </el-select>
              </el-form-item>
            </el-col>
          </div>
          <div class="col-bor-tem">
            <el-col :span="12">
              <el-form-item label="优免时长" prop="field103">
                <el-input v-model="formData.field103" placeholder="请输入优免时长" clearable :style="{width: '100%'}">
                </el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="优免金额" prop="field104">
                <el-input v-model="formData.field104" placeholder="请输入优免金额" clearable :style="{width: '100%'}">
                </el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12" >
              <el-button type="primary" @click="save">保存</el-button>
              <el-button type="danger" @click="delet">删除</el-button>
            </el-col>
          </div>
        </div>



        <!--        </el-row>-->

        <el-col :span="24">
          <el-form-item size="large">
            <el-button type="primary" @click="submitForm">提交</el-button>
            <el-button @click="resetForm">重置</el-button>
          </el-form-item>
        </el-col>
      </el-form>
    </el-row>
  </div>
</template>
<script>
export default {
  components: {},
  props: [],
  data() {
    return {
      formData: {
        field101: this.$route.query.pid,
        field102: this.$route.query.chname,
        field103: undefined,
        field104: undefined,
        field105: '',
        field106: undefined,
      },
      rules: {
        field101: [{
          required: true,
          message: '请选择所在物业',
          trigger: 'change'
        }],
        field102: [{
          required: true,
          message: '请选择所在车场',
          trigger: 'change'
        }],
        field103: [{
          required: true,
          message: '请输入优免时长',
          trigger: 'blur'
        }],
        field104: [{
          required: true,
          message: '请输入优免金额',
          trigger: 'blur'
        }],
      },
      field101Options: [{
        "label": "选项一",
        "value": 1
      }, {
        "label": "选项二",
        "value": 2
      }],
      field102Options: [{
        "label": "选项一",
        "value": 1
      }, {
        "label": "选项二",
        "value": 2
      }],
    }
  },
  computed: {},
  watch: {},
  created() {},
  mounted() {},
  methods: {

    save(){

    },
    delet(){

    },
    submitForm() {
      this.$refs['elForm'].validate(valid => {
        if (!valid) return
        // TODO 提交表单
      })
    },
    resetForm() {
      this.$refs['elForm'].resetFields()
    },
  }
}

</script>
<style scoped>
.col-bor {
  display: flex;
  width: 90%;
  margin: 20px auto;
  height: 40%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04);
//background-color: black;
  border-radius: 5%;
  border: 1px solid rgba(58, 55, 48, 0.34);
  .col-bor-tem {
    display: block;
    margin-top: 20px;
  }
}
</style>






























